# 使用稳定版本的Nginx基础镜像
FROM dockerproxy.com/library/nginx:alpine


# 设置工作目录
WORKDIR /usr/share/nginx/html

# 删除默认html文件
RUN rm -rf /usr/share/nginx/html/*

# 复制静态资源
COPY *.html ./
COPY css/ ./css/
COPY js/ ./js/

# 替换配置文件
RUN rm -f ./js/config.js && mv ./js/config-docker.js ./js/config.js

# 复制Nginx配置
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

# 暴露端口
EXPOSE 80

# 启动nginx
CMD ["nginx", "-g", "daemon off;"]
